﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Threading;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Threading;

namespace PhotoPuzzle
{
	public partial class MenuButton : UserControl
	{
		public MenuButton()
		{
			// Required to initialize variables
			InitializeComponent();
            
        }

        public ImageSource ButtonImageSource
        {
            get
            {
                return imageout.Source;
            }
            set
            {
                imageout.Source = value;
            }
        }
        private bool isSelect;

        public bool IsSelect
        {
            get { return isSelect; }
            set 
            {
                if (value)
                {
                    rectsel.Visibility = System.Windows.Visibility.Visible;
                    Ani_Def.Begin();
                }
                else
                {
                    rectsel.Visibility = System.Windows.Visibility.Collapsed;
                    Ani_Def.Stop();
                }
                isSelect = value; 
            }
        }
        public Action OnActionBegin { get;set; }
	}
}